package br.requisiteworks.util.validacao;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class TextoValidator implements ConstraintValidator<Texto, String>{

	public void initialize(Texto constraintAnnotation) {
		
	}

	@Override
	public boolean isValid(String value, ConstraintValidatorContext context) {
		return value != null && !value.trim().isEmpty() && value.length() <= 256;
	}

}
